import { apiRequest } from "../utils/request";
//批量上传
export function uploadFiles(data: any): any {
  return apiRequest({
    url: `/infra/file/uploadFiles`,
    method: "POST",
    header: {
      "content-type": "multipart/form-data; boundary=XXX",
    },
    data,
  });
}
//创建文件夹
export function createFolder(data: any) {
  return apiRequest({
    url: `/member/files/createFolder`,
    method: "post",
    data,
  });
}

//文件数量
export function filesCount(data: any) {
  return apiRequest({
    url: `/member/files/filesCount`,
    method: "get",
    data,
  });
}

//查询文件夹列表
export function getFolderList(data: any) {
  return apiRequest({
    url: `/member/files/folderList`,
    method: "get",
    data,
  });
}
//新增文件
export function addFiles(data: any) {
  return apiRequest({
    url: `/member/files/addFiles`,
    method: "post",
    data,
  });
}
//文件夹下文件（分页）
export function getFilesList(data: any) {
  return apiRequest({
    url: `/member/files/filesList`,
    method: "get",
    data,
  });
}
//删除文件夹
export function deleteFolder(data: any) {
  return apiRequest({
    url: `/member/files/deleteFolder`,
    method: "post",
    data,
  });
}
//修改文件夹
export function editFolder(data?: any) {
  return apiRequest({
    url: `/member/files/editFolder`,
    method: "post",
    data,
  });
}
//删除文件
export function deleteFiles(data?: any) {
  return apiRequest({
    url: `/member/files/deleteFiles`,
    method: "post",
    data,
  });
}
//获取默认文件夹
export function getDefaultFolderList(data?: any) {
  return apiRequest({
    url: `/member/defaultFolder/getDefaultFolderList`,
    method: "get",
    data,
  });
}
